<template>
    <div>
        <div class="crumbs">
            <el-breadcrumb separator="/">
                <el-breadcrumb-item>新增分类</el-breadcrumb-item>
            </el-breadcrumb>
        </div>
        <div class="container">
            <div class="form-box">
                <el-form ref="form" :model="form" label-width="80px">
                    <el-form-item label="分类名称">
                        <el-input v-model="p_name"></el-input>
                    </el-form-item>
                    <el-form-item label="排序">
                        <el-input-number v-model="orderindex" :min="0" :max="10000" label="描述文字"></el-input-number>
                    </el-form-item>
                    <el-form-item>
                        <el-button type="primary" @click="onSubmit">提交</el-button>
                        <el-button>取消</el-button>
                    </el-form-item>
                </el-form>
            </div>
        </div>

    </div>
</template>

<script>
  export default {
    data: function(){
      return {
        p_name:'',
        orderindex:''
      }
    },
    methods: {
      onSubmit() {
        let self = this
        this.$axios.post(`https://dttx.0576sj.com/moblie/tongji/insertCollection`, self.qs.stringify({
          p_name: self.p_name,
          orderindex: self.orderindex
            })).then((res) => {
        })
        this.$message.success('提交成功！');
      }
    }
  }
</script>